home *** CD-ROM | disk | FTP | other *** search
/ Windows News 2005 February / WN_129_CD.iso / Windows / Extensions Firefox / FlashGot / flashgot-0.5.3.xpi / chrome / flashgot.jar / content / flashgot / filepickerOverlay.js < prev    next >
Encoding:
Text File  |  2004-11-14  |  612 b   |  20 lines

  1. window.addEventListener("load",filePickerDirtyPatch,false);
  2.  
  3. function filePickerDirtyPatch() {
  4.   if(window.title && window.title.indexOf("FlashGot")==0
  5.     && typeof(window.gotoDirectory)=="function") {
  6.     window.fpdp_gotoDirectory=window.gotoDirectory;
  7.     window.gotoDirectory=function(d) {
  8.       window.fpdp_gotoDirectory(d);
  9.       if( filePickerMode == nsIFilePicker.modeGetFolder
  10.           && textInput && (!textInput.value) 
  11.           && d && d.path
  12.          ) {
  13.          textInput.value="."+(d.path.indexOf("\\")>-1?"\\":"/");
  14.          textInput.select();
  15.          textInput.focus();
  16.       }
  17.     }
  18.   }
  19. }
  20.